<?php
namespace app\api\controller;

use think\Controller;

class City extends Controller
{
    public function getCityByParentId()
    {
        $id = input('post.id');
        // if(!$id) {
        //     $this->error("Id不合法");
        // }

       $citylist = model("City")->getNormalCityByParentId($id);

       if (!$citylist) {
           return show(-1,'error');
       }

        return show(1,'success',$citylist);
    }
}     